/**
 * render column overwrite querylist4ext.js
 * 
 * @param {}
 *            value
 * @param {}
 *            cellmeta
 * @param {}
 *            record
 * @param {}
 *            rowIndex
 * @param {}
 *            columnIndex
 * @param {}
 *            store
 * @return {}
 */
function renderHeader(value, cellmeta, record, rowIndex, columnIndex, store) {
	var fieldName = Ext.getCmp(querykey).getColumnModel()
			.getDataIndex(columnIndex);
	if (fieldName == 'OPEN') {
		var resultString = String
				.format(
						'<b><a href="'
								+ context
								+ '/app/lfbl.do?method=edit&key=APP_LFDJ&id={0}&querykey='+querykey+'">派遣办理</a></b>',
						record.data.ID, value);

		return resultString;
	} else if (fieldName == 'XFTIME') {
		return formatDate(value);
	}else if(fieldName == 'XJTIME'){
		//var now = new Date().pattern("yyyyMMdd"); 
		var now = new Date().pattern("MM-dd-yyyy"); 
		f = value.substring(0, 4);
		m = value.substring(5, 7);
		e = value.substring(8, 10);
		var xjtime = m+"-"+e+"-"+f ;
		
		if (Date.parse(xjtime) - Date.parse(now)<= 0) {
		
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp3.gif'  style='margin-bottom:-4px'/></div>" ;
		}else if (Date.parse(xjtime) - Date.parse(now)  >= 15) {
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp4.gif'  style='margin-bottom:-4px'/></div>" ;
		}else if (0 < Date.parse(xjtime) - Date.parse(now) < 15) {
		return "<div align='center'><img src='"
				+ context
				+ "/app/lf/images/lamp2.gif'  style='margin-bottom:-4px'/></div>" ;
		}
		return now;
	} else if (fieldName == 'LFSTATUS') {
		if (value == '0') {
			return '否';
		} else if (value == '1') {
			return '是';
		}
	} else if (fieldName == 'BLSTATUS') {
		if (value == '0') {
			return '待处理';
		} else if (value == '1') {
			return '自处理';
		} else if (value == '2') {
			return '科室办理';
		} else if (value == '3') {
			return '上报处理';
		} else if (value == '-1') {
			return '未予办理';
		}
	}
	return value;
}